<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title><%= ctrl.site %> - User</title>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<link rel="stylesheet" href="/base.css">
	<link rel="stylesheet" href="/user.css">
	<link rel="stylesheet" href="/customer.css">
	<script src="/timeago.min.js"></script>
	<script src="/base.js"></script>
</head>
<body>
	<section class="top">
		<div class="view-width">
			<div class="top-nav-right">
				<% if(!ctrl.me_login) {%>
					<li><button onclick="show_box('l')" class="good-button-top" >Login</button></li>
					<li><button onclick="show_box('r')" class="good-button-top" >Rigist</button></li>
				<% }else {%>
					<a href=<%= "javascript:show_box('"+ctrl.me_id+"')" %> ><li><%= ctrl.me_nickname %></li></a>
				<% }%>
				<div id="login-box">
				</div>
			</div>
			<div class="top-nav-left">
				<li title="logo">LATTE FORUM 1.0</li>
			</div>
		</div>
	</section>
	<section class="banner">
		<div class="view-width">
			<div class="banner-nav-right">
				<li><input type="text" class="less-width-searcher"><button>search</button></li>
				<li><a href="/editor"><button>Add</button></a></li>
			</div>
			<div class="banner-nav">
				<a href="/">home</a> - 
			</div>
		</div>
	</section>
	<section class="main">
		<div class="view-width">
			<p>
				<h5><%= doc.nickname %></h5>
				<span class="good-time light"><%= doc.near_login %></span><span class="light"></span>
			</p>
			<hr>
			<br>
			<span class="light margin-top-rem">posts:</span>
			<ul class="user-posts-ul">
				<% for(var i in doc.posts) {%>
					<% i = (doc.posts.length-i) %>
					<% if(doc.posts[i]) {%>
						<li><a href=<%= '/post/'+doc.posts[i].id+'/0' %> ><%= doc.posts[i].title %></a></li>
					<% }%>
				<% }%>
			</ul>
			<br>
			<span class="light margin-top-rem">replies:</span>
			<ul class="user-replies-ul">
				<% for(var i in doc.replies) {%>
					<% i = (doc.replies.length-i) %>
					<% if(doc.replies[i]) {%>
						<li><a href=<%= '/post/'+doc.replies[i].id+'/0' %> ><%= doc.replies[i].title %></a></li>
					<% }%>
				<% }%>
			</ul>
		</div>
	</section>
	<section class="foot">
		<div class="view-width">
			<p>LATTE FORUM 1.0 - Base on Express and MongoDB</p>
		</div>
	</section>
</body>
</html>